package com.qst.medical.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class WelcomeController {

    @GetMapping("/")
    public Map<String, String> welcome() {
        Map<String, String> response = new HashMap<>();
        response.put("message", "Welcome to Medical System API");
        response.put("documentation", "Please visit /swagger-ui.html for API documentation");
        return response;
    }

    @PostMapping("/")
    public Map<String, String> handlePost() {
        Map<String, String> response = new HashMap<>();
        response.put("message", "POST method is not supported for root path. Please use /api/login for authentication.");
        response.put("documentation", "Please visit /swagger-ui.html for API documentation");
        return response;
    }
}